import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import dataV from "@jiaminghi/data-view"; // 将自动注册所有组件为全局组件

import axios from "axios";

// 这里设置的根地址需要后端去做跨域处理
// devServe 和 这里同时设置 走的是这里的配置
axios.defaults.baseURL = 'http://127.0.0.1:3000'
// axios.defaults.baseURL = "http://101.34.67.25:3000";

Vue.prototype._axios = axios;

var JavaScriptObfuscator = require("javascript-obfuscator");
var obfuscationResult = JavaScriptObfuscator.obfuscate(
  `
    alert(1)
  `,
  {
    compact: false,
    controlFlowFlattening: true,
  }
);

console.log(obfuscationResult.getObfuscatedCode());

Vue.use(ElementUI);
Vue.use(dataV);
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
